# Maintainer: David Runge <dvzrv@archlinux.org>
# Maintainer: Jonas Witschel <diabonas@archlinux.org>

pkgname=helvum
pkgver=0.5.1
pkgrel=1
pkgdesc='GTK patchbay for PipeWire'
arch=(loong64 x86_64)
url='https://gitlab.freedesktop.org/pipewire/helvum'
license=(GPL-3.0-only)
depends=(
  cairo
  gcc-libs
  gdk-pixbuf2
  glib2
  glibc
  graphene
  gtk4
  hicolor-icon-theme
  libadwaita
  libpipewire
  pango
  pipewire
)
makedepends=(
  appstream-glib
  cargo
  clang
  meson
)
# LTO suddenly breaks linking stage: https://gitlab.freedesktop.org/pipewire/helvum/-/issues/111
options=(!lto)
source=($url/-/archive/$pkgver/helvum-$pkgver.tar.gz)
sha512sums=('7d4655a32d0c35c4bcc4164f8bc08654be08613d488a12ec237ef7757242ebd3ca6bc944eb757a234080187eec2c9b558bdba228e8e1a9d9e670c1620f5bb4d1')
b2sums=('b178d072303d7ea3d459d54114667fc4a0d1187e7ff93f2892924d68583b452699553cd34c6624b536001057c46a16a44de81fbfdf5fbff8397cba089ad20cc2')

build() {
  arch-meson "$pkgname-$pkgver" build
  meson compile -C build
}

package() {
  meson install -C build --destdir "$pkgdir"
}
